import {
    request
} from "../utils/http.js"; //导入我们封装的请求方法。

//查询主播任务列表
export const anchorTaskList = (data) => {
    return request({
        url: '/anchor/task/v1/list',
        method: "GET",
        data
    })
}
// 查询是否需要获取用户授权code
export const anchorTaskOauth = (data) => {
    return request({
        url: '/anchor/task/v1/oauth',
        method: "GET",
        data
    })
}

// 领取分享直播间奖励
export const anchorTaskLive = (data) => {
    return request({
        url: '/anchor/task/v1/acquire/Live',
        method: "POST",
        data
    })
}

// 关注主播领取奖励
export const anchorTaskAnchor = (data) => {
    return request({
        url: '/anchor/task/v1/acquire/anchor',
        method: "POST",
        data
    })
}

// 领取新人奖励
export const anchorTaskRegister = (data) => {
    return request({
        url: '/anchor/task/v1/acquire/register',
        method: "POST",
        data
    })
}

// 会员信息（专属积分中心）
export const anchorMemberInfo = (id) => {
    return request({
        url: `/anchor/member/info/${id}`,
        method: "get",
    })
}

// 热门兑换推荐列表
export const anchorMemberRecommendGoods = (data) => {
    return request({
        url: '/anchor/member/recommend/goods',
        method: "get",
        data
    })
}

// 会员积分流水
export const anchorMemberIntegralLog = (data) => {
    return request({
        url: '/anchor/member/integral/log',
        method: "get",
        data
    })
}

// 会员可用积分数量
export const anchorMemberIntegralUsable = (data) => {
    return request({
        url: '/anchor/member/integral/usable',
        method: "get",
        data
    })
}

// 会员权益
export const anchorMemberLevel = (id) => {
    return request({
        url: `/anchor/member/level/${id}`,
        method: "get"
    })
}

// 签到信息
export const anchorSignInfo = (id) => {
    return request({
        url: `/anchor/sign/info/${id}`,
        method: "get"
    })
}
// 立即签到
export const anchorSignSign = (data) => {
    return request({
        url: '/anchor/sign/sign',
        method: "post",
        data
    })
}